package priv.pattern.prototypepattern.abs;

/*
 * 作者：m鹏h
 * 时间；2024/7/4 21:44
 * 描述：画画的抽象类
 **/
public abstract class Shape implements Cloneable {
    public String id;
    public String type;

    public abstract void draw();

    public String getType() {
        return type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setType(String type) {
        this.type = type;
    }

    //克隆的方法
    public Object clone(){
        Object clone = null;
        try {
            clone = super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }



}
